package com.leozhang.app;

import com.spire.xls.*;

public class ModifyExcel {
    public static void main(String[] args) {
        Workbook workbook = new Workbook();
        workbook.loadFromFile("Example.xlsx");

        Worksheet sheet = workbook.getWorksheets().get(0);
        
        // 修改单元格内容
        sheet.getCellRange("A1").setText("Updated Text");

        // 保存修改后的文件
        workbook.saveToFile("Example_Modified.xlsx", ExcelVersion.Version2016);
    }
}

